#ifndef PT100_LIB_H_
#define PT100_LIB_H_

#include "templib.h"

#ifdef __cplusplus
extern "C"
{
#endif

    typedef struct
    {
        float Res;     
        int32_t AdVal; 
    } temp_sample_type;

    typedef struct
    {
        uint8_t Err;         
        uint8_t sample_nums; 
        uint8_t bCFEn;
        int32_t AdcVal;
        
        int16_t Pb;
        int16_t Pk;
        
        float TempLimiteL; 
        float TempLimiteH; 
        
        float Flt;
        float TempOrg;  
        float TempReal; 
        float TempCtr;  
        float TempDisp; 

        float coef; 

        int16_t iTempCtr;
        int16_t iTempDisp;
        int16_t iTempOrg;

        temp_sample_type Sample[4]; 

        uint8_t correct_point_len;
        temp_correct_mode_type correct_mode;
        void *correct_list;

    } pt100_type;

    float pt100_cal(pt100_type *pt);

    float pt100_cal_pbpk(pt100_type *pt);

    float pt100_cal_imap(pt100_type *pt);

#ifdef __cplusplus
}
#endif

#endif 
